﻿@using AntDesign.Select.Internal
@namespace AntDesign.Select
@typeparam TItemValue
@typeparam TItem

<span class="@Class" style="@Style" @ref="Ref">
  <span class="@ContentClass" style="@ContentStyle">
    @LabelTemplateItemContent(SelectOption.Item)
  </span>

  @if (ParentSelect.Mode != SelectMode.Default && !ParentSelect.Disabled)
  {
    <span unselectable="on" aria-hidden="true" style="user-select: none; @RemoveIconStyle" class="@RemoveIconClass"
        @onclick="()=> ParentSelectContent.OnRemoveSelected.InvokeAsync(SelectOption)" @onclick:stopPropagation>
      <Icon Type="close"></Icon>
    </span>
  }
</span>